home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / cert_advisories / CA-93:10.anonymous.FTP.activity < prev    next >
Encoding:
Text File  |  1993-07-14  |  11.8 KB  |  258 lines

  1. ===========================================================================
  2. CA-93:10                        CERT Advisory
  3.                      July 14, 1993
  4.                             Anonymous FTP Activity
  5.  
  6. ---------------------------------------------------------------------------
  7.  
  8. The CERT Coordination Center has been receiving a continuous stream of 
  9. reports from sites that are experiencing unwanted activities within their 
  10. anonymous FTP areas.  We recognize that this is not a new problem, and we 
  11. have been striving to handle requests for assistance on a one-to-one basis 
  12. with the reporting administrator. However, since this activity does not seem 
  13. to be diminishing, CERT believes that a broad distribution of information 
  14. concerning this problem and corresponding solution suggestions should help 
  15. to address the widespread nature of this activity.
  16.  
  17. We are seeing three types of activity regarding anonymous FTP areas.
  18.  
  19.    A. Improper configurations leading to system compromise.
  20.  
  21.    B. Excessive transfer of data causing deliberate over-filling of
  22.       disk space thus leading to denial of service.
  23.  
  24.    C. Use of writable areas to transfer copyrighted software and other
  25.       sensitive information.
  26.  
  27. This advisory provides an updated version of the anonymous FTP configuration
  28. guidelines that is available from CERT.  The purpose of these guidelines is
  29. to assist system administrators at sites that offer anonymous FTP services.
  30. These guidelines are intended to aid a system administrator in configuring
  31. anonymous FTP capabilities so as to minimize unintended use of services or
  32. resources.  Systems administrators should be aware that anonymous FTP
  33. capabilities should be configured and managed according to the policies
  34. established for their site.
  35.  
  36. You may obtain future copies of these guidelines through anonymous FTP from
  37. cert.org in /pub/tech_tips/anonymous_ftp.
  38.  
  39. ---------------------------------------------------------------------------
  40.  
  41.  
  42.         ANONYMOUS FTP CONFIGURATION GUIDELINES
  43.  
  44. Anonymous FTP can be a valuable service if correctly configured and
  45. administered. The first section of this document provides general guidance in
  46. initial configuration of an anonymous FTP area.  The second section addresses
  47. the issues and challenges involved when a site wants to provide writable
  48. directories within their anonymous FTP areas. The third section provides
  49. information about previous CERT advisories related to FTP services.
  50.  
  51. The following guidelines are a set of suggested recommendations that have been
  52. beneficial to many sites. CERT recognizes that there will be sites that have
  53. unique requirements and needs, and that these sites may choose to implement
  54. different configurations.
  55.  
  56. I.  Configuring anonymous FTP
  57.  
  58.     A. FTP daemon
  59.  
  60.        Sites should ensure that they are using the most recent version
  61.        of their FTP daemon.
  62.  
  63.     B. Setting up the anonymous FTP directories
  64.  
  65.        The anonymous FTP root directory (~ftp) and its subdirectories 
  66.        should not be owned by the ftp account or be in the same group as
  67.        the ftp account.  This is a common configuration problem.  If any of 
  68.        these directories are owned by ftp or are in the same group as the 
  69.        ftp account and are not write protected, an intruder will be able to 
  70.        add files (such as a .rhosts file) or modify other files.  Many sites
  71.        find it acceptable to use the root account.  Making the ftp root 
  72.        directory and its subdirectories owned by root, part of the system 
  73.        group, and protected so that only root has write permission will help 
  74.        to keep your anonymous FTP service secure.
  75.  
  76.        Here is an example of an anonymous FTP directory setup:
  77.  
  78.            drwxr-xr-x  7   root    system  512 Mar 1       15:17 ./
  79.            drwxr-xr-x 25   root    system  512 Jan 4       11:30 ../
  80.            drwxr-xr-x  2   root    system  512 Dec 20      15:43 bin/
  81.            drwxr-xr-x  2   root    system  512 Mar 12      16:23 etc/
  82.            drwxr-xr-x 10   root    system  512 Jun 5       10:54 pub/
  83.  
  84.        Files and libraries, especially those used by the FTP daemon and
  85.        those in ~ftp/bin and ~ftp/etc, should have the same protections
  86.        as these directories.  They should not be owned by ftp or be in the 
  87.        same group as the ftp account; and they should be write protected.
  88.  
  89.     C. Using proper password and group files
  90.  
  91.        We strongly advise that sites not use the system's /etc/passwd file as 
  92.        the password file or the system's /etc/group as the group file in the 
  93.        ~ftp/etc directory.  Placing these system files in the ~ftp/etc 
  94.        directory will permit intruders to get a copy of these files. 
  95.        These files are optional and are not used for access control.
  96.  
  97.        We recommend that you use a dummy version of both the ~ftp/etc/passwd 
  98.        and ~ftp/etc/group files. These files should be owned by root. The
  99.        dir command uses these dummy versions to show owner and group
  100.        names of the files and directories instead of displaying arbitrary 
  101.        numbers.
  102.  
  103.        Sites should make sure that the ~/ftp/etc/passwd file contains no 
  104.        account names that are the same as those in the system's /etc/passwd 
  105.        file.  These files should include only those entries that are relevant 
  106.        to the FTP hierarchy or needed to show owner and group names. In 
  107.        addition, ensure that the password field has been cleared.  The 
  108.        examples below show the use of asterisks (*) to clear the password 
  109.        field.
  110.  
  111.        Below is an example of a passwd file from the anonymous FTP area on
  112.        cert.org:
  113.  
  114.            ssphwg:*:3144:20:Site Specific Policy Handbook Working Group::
  115.            cops:*:3271:20:COPS Distribution::
  116.            cert:*:9920:20:CERT::
  117.            tools:*:9921:20:CERT Tools::
  118.            ftp:*:9922:90:Anonymous FTP::
  119.            nist:*:9923:90:NIST Files::
  120.  
  121.        Here is an example group file from the anonymous FTP area on cert.org:
  122.  
  123.            cert:*:20:
  124.            ftp:*:90:
  125.  
  126.  
  127. II. Providing writable directories in your anonymous FTP configuration
  128.  
  129.     There is a risk to operating an anonymous FTP service that permits 
  130.     users to store files.  CERT strongly recommends that sites do not 
  131.     automatically create a "drop off" directory unless thought has been 
  132.     given to the possible risks of having such a service.  CERT has received 
  133.     many reports where these directories have been used as "drop off" 
  134.     directories to distribute bootlegged versions of copyrighted software or 
  135.     to trade information on compromised accounts and password files.  CERT 
  136.     has also received numerous reports of files systems being maliciously 
  137.     filled causing denial of service problems.  
  138.  
  139.     This section discusses three ways to address these problems. The first is 
  140.     to use a modified FTP daemon. The second method is to provide restricted 
  141.     write capability through the use of special directories. The third method
  142.     involves the use of a separate directory.
  143.  
  144.     A. Modified FTP daemon
  145.  
  146.        If your site is planning to offer a "drop off" service, CERT suggests 
  147.        using a modified FTP daemon that will control access to the "drop off" 
  148.        directory.  This is the best way to prevent unwanted use of writable
  149.        areas. Some suggested modifications are:
  150.  
  151.        1. Implement a policy where any file dropped off cannot 
  152.           be accessed until the system manager examines the file 
  153.           and moves it to a public directory.
  154.        2. Limit the amount of data transferred in one session.
  155.        3. Limit the overall amount of data transferred based on 
  156.           available disk space.
  157.        4. Increase logging to enable earlier detection of abuses.
  158.  
  159.        For those interested in modifying the FTP daemon, source code is 
  160.        usually available from your vendor. Public domain sources are 
  161.        available from:
  162.  
  163.           wuarchive.wustl.edu   ~ftp/packages/wuarchive-ftpd
  164.           ftp.uu.net            ~ftp/systems/unix/bsd-sources/libexec/ftpd
  165.           gatekeeper.dec.com    ~ftp/pub/DEC/gwtools/ftpd.tar.Z
  166.  
  167.        The CERT Coordination Center has not formally reviewed, evaluated, 
  168.        or endorsed the FTP daemons described.  The decision to use the FTP 
  169.        daemons described is the responsibility of each user or organization, 
  170.        and we encourage each organization to thoroughly evaluate these 
  171.        programs before installation or use. 
  172.  
  173.     B. Using protected directories
  174.  
  175.        If your site is planning to offer a "drop off" service and is unable 
  176.        to modify the FTP daemon, it is possible to control access by using a 
  177.        maze of protected directories.  This method requires prior coordination
  178.        and cannot guarantee protection from unwanted use of the writable FTP 
  179.        area, but has been used effectively by many sites.
  180.  
  181.        Protect the top level directory (~ftp/incoming) giving only execute 
  182.        permission to the anonymous user (chmod 751 ~ftp/incoming).  This will 
  183.        permit the anonymous user to change directory (cd), but will not allow 
  184.        the user to view the contents of the directory.
  185.  
  186.        drwxr-x--x  4   root    system  512 Jun 11      13:29 incoming/
  187.  
  188.        Create subdirectories in the ~ftp/incoming using names known only 
  189.        between your local users and the anonymous users that you want to 
  190.        have "drop off" permission.  The same care used in selecting passwords
  191.        should be taken in selecting these subdirectory names because the 
  192.        object is to choose names that cannot be easily guessed.  Please do not
  193.        use our example directory names of jAjwUth2 and MhaLL-iF.
  194.  
  195.            drwxr-x-wx 10   root    system  512 Jun 11      13:54 jAjwUth2/
  196.            drwxr-x-wx 10   root    system  512 Jun 11      13:54 MhaLL-iF/
  197.  
  198.        This will prevent the casual anonymous FTP user from writing files in 
  199.        your anonymous FTP file system.  It is important to realize that this 
  200.        method does not protect a site against the result of intentional or 
  201.        accidental disclosure of the directory names.  Once a directory name 
  202.        becomes public knowledge, this method provides no protection at all 
  203.        from unwanted use of the area.  Should a name become public, a site 
  204.        may choose to either remove or rename the writable directory.
  205.  
  206.     C. Using a single disk drive
  207.  
  208.        If your site is planning to offer a "drop off" service and is
  209.        unable to modify the FTP daemon, it may be desirable to limit
  210.        the amount of data transferred to a single file system mounted
  211.        as ~ftp/incoming.
  212.  
  213.        If possible, dedicate a disk drive and mount it as ~ftp/incoming.
  214.        If this dedicated disk becomes full, it will not cause a denial
  215.        of service problem.
  216.  
  217.        The system administrator should monitor this directory (~ftp/incoming)
  218.        on a continuing basis to ensure that it is not being misused.
  219.  
  220.  
  221. III. Related CERT Advisories
  222.  
  223.     The following CERT Advisories directly relate to FTP daemons or impact
  224.     on providing FTP service:
  225.  
  226.         CA-93:06.wuarchive.ftpd.vulnerability
  227.         CA-92:09.AIX.anonymous.ftp.vulnerability
  228.         CA-88:01.ftpd.hole
  229.  
  230.     Past advisories are available for anonymous FTP from cert.org.
  231.  
  232.  
  233. Copyright (c) Carnegie Mellon University 1993
  234.  
  235.  
  236.  
  237. ---------------------------------------------------------------------------
  238.  
  239.  
  240. If you believe that your system has been compromised, contact the CERT
  241. Coordination Center or your representative in FIRST (Forum of Incident
  242. Response and Security Teams).
  243.  
  244. Internet E-mail: cert@cert.org
  245. Telephone: 412-268-7090 (24-hour hotline)
  246.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  247.            and are on call for emergencies during other hours.
  248.  
  249. CERT Coordination Center
  250. Software Engineering Institute
  251. Carnegie Mellon University
  252. Pittsburgh, PA 15213-3890
  253.  
  254. Past advisories, information about FIRST representatives, and other information
  255. related to computer security are available for anonymous FTP from cert.org
  256. (192.88.209.5).
  257.  
  258.